#include "EPhCharacter.h"
#include "eCPP.h"

namespace engine
{

//------------------------------------------------------------
EPhCharacterDesc::EPhCharacterDesc() :
m_fCapsuleRadius( 5.f ),
m_fCapsuleHeight( 20.f )
{

}

//------------------------------------------------------------
bool EPhCharacterDesc::isValid() const
{
  cTEST( m_fCapsuleHeight > 0.f );
  cTEST( m_fCapsuleRadius > 0.f );
  return true;
}

//------------------------------------------------------------
EPhCharacter::EPhCharacter(const EPhCharacterDesc& desc ) :
m_Desc( desc ),
m_pPhController( NULL )
{
  m_PhControllerDesc.m_vPosition  = EVector(0.f, desc.m_fCapsuleHeight*.5f, 0.f);
  m_PhControllerDesc.m_fHeight    = desc.m_fCapsuleHeight;
  m_PhControllerDesc.m_fRadius    = desc.m_fCapsuleRadius;
}

//------------------------------------------------------------
void EPhCharacter::setPhController(EPhController* pPhController)
{
  m_pPhController = pPhController;
}

} // end namespace
